<template>
	<view class="page flex-col">
		<!-- 	<navbar title="家庭档案">
			<view class="head-left" @click="getLocationBtn">

			</view>

		</navbar> -->
		<view class="text-wrapper_1 flex-col">
			<text class="text_1">{{pageData.homeName}}</text>
		</view>
		<view class="group_1 flex-col">


			<view class="image-text_2 flex-row justify-between">
				<image class="label_2" src="../../static/my/icon_shdz.png" mode=""></image>
				<view class="text-group_2">
					{{pageData.homeAddress}}
				</view>
			</view>
			<view class="image-text_2 flex-row justify-between">
				<image class="label_2" src="../../static/my/icon_cgyy.png" mode=""></image>
				<view class="text-group_2">
					{{pageData.homeInfo}}
				</view>
			</view>


			<view class="" class="image_7" style="border: 1rpx solid #f5f5f5;">

			</view>
			<view class="" style="width: 90%;margin: 20rpx auto;">
				<text class="text_7">家庭成员</text>
				<view class="" style="display: flex;flex-wrap: wrap;">
					<view class="group_4 flex-row" v-for="(item,index) in pageData.homeMemberList" :key="index">
						<view class="text-wrapper_2 bb flex-col">
							<text class="text_8">{{item.relation}}</text>
						</view>
						<view class="text-group_3 flex-col">
							<text class="text_9">{{item.name}}</text>
							<text class="text_10">{{item.phone}}</text>
						</view>
					</view>
				</view>
			</view>

			<view class="" class="image_7" style="border: 1rpx solid #f5f5f5;">

			</view>
			<view class="group_8 ">
				<view class="text_32">家庭积分</view>
				<view class="flex-row justify-between" style="align-items: center;">
					<view class="text-group_11">
						<text class="text-group_111 bc">{{pageData.homeIntegral}}</text>
						<text class="bc">分</text>
					</view>
					<view class="text-wrapper_10 bb flex-col"
						@click="goPage('/pagesA/family/integral?homeId='+pageData.id)">
						<text class="text_35 ">查看明细</text>
					</view>


				</view>



			</view>
			<view class="" class="image_7" style="border: 1rpx solid #f5f5f5;">

			</view>
			<text class="text_36">家庭勋章</text>
			<view class="" style="display: flex;flex-wrap: wrap;width: 90%;margin: 20rpx auto;lex-wrap: wrap;">
				<view class="group_9 justify-between" v-for="(item,index) in pageData.medalList">
					<image class="image_11" :src="item.image" mode="">

					</image>
					<view class="text-group_12">{{item.name}}</view>
				</view>
			</view>

		</view>
		<home></home>
	</view>
</template>
<script>
	import home from '@/components/home/index.vue'
	import {
		homeDetail
	} from '@/api/togeterRich/family.js'
	import navbar from '@/components/navbar.vue';
	export default {
		components: {
			navbar,
			home
		},
		data() {
			return {
				pageData: {}
			};
		},
		onLoad() {
			uni.hideLoading()
			this.init()
		},
		methods: {
			init() {
				homeDetail().then(res => {
					this.pageData = res.data
					console.log(res, '我是啥')
				})
			},
			goPage(url) {
				uni.navigateTo({

					url: url
				})
			},
		},
	};
</script>
<style lang="scss">
	@import 'com/index.css';
	@import '@/com/css/common.css';
	.bc{
			color: $maincolor !important;
		}
		.bgb{
			border: 2rpx solid $maincolor !important;
		}
		.bb{
			background: $maincolor;
		}
</style>